package com.yuhs.zixing.study.design.pattern.dp002.structural.s003.decorator.d002;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/1 9:21 PM
 */
public class SortDecorator002 extends Decorator002 {
    //构造函数
    public SortDecorator002(SchoolReport002 sr) {
        super(sr);
    }

    //告诉老爸学校的排名情况
    private void reportSort() {
        System.out.println("我是排名第38名...");
    }

    //老爸看完成绩单后再告诉他，加强作用
    @Override
    public void report() {
        super.report();
        this.reportSort();
    }
}
